package com.itheima.web;

import com.itheima.pojo.Result;
import com.itheima.service.SearchService;
import com.itheima.utils.KibanaUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("good")
public class SearchController {
    @Autowired
    private SearchService searchService;
    @GetMapping("search/{pageNum}/{pageSize}")
    public Result searchGoods(@PathVariable("pageNum")Integer pageNum, @PathVariable("pageSize") Integer pageSize, @RequestParam String keyword){
        return searchService.search(pageNum,pageSize,keyword);
    }


}
